package com.shiminghui;

import java.util.Scanner;

public class Arrays {
    public static void main(String[] args) {

        int[] array= new int[6];
        array[0]=1;
        array[1]=2;
        System.out.println(array.length);

        int[] array2 = {1,2,3,4,5};
        for (int i =0;i<array2.length;i++){
            System.out.println(array2[i]);
        }
        //数组的长度不会变了
        double[] array3 = {1.2,3.32,3.123,4.4};
        System.out.println(array3);
        /*
        * [D@e9e54c2
        * [这是个数组
        * D数据类型是double
        * @无实义
        * */

        Scanner scanner = new Scanner(System.in);

        int num = scanner.nextInt();

        String arr[]= new String[num];
        for (int i = 0; i<arr.length;i++){
            System.out.println(arr[i]);
            arr[i]=scanner.next();
        }

/*整数0
小数0.0
字符'\u0000'空格
布尔false
引用null
*
* */

    }
}
